<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <title></title>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    html, body,#app {
      width: 100%;
      height: 100%;
    }
    #app {
      display: flex;
    }
    #content {
      margin: auto;
      font-size: 50px;
    }
  </style>
</head>

<body>
  <div id="app">
    <h1 id="content"></h1>
  </div>
  <script>
    let apiurl = window.location.protocol + "//" + window.location.hostname + ":8888"
    let content = document.getElementById("content")
    window.onload = async function () {
      setInterval(() => {
        axios.get(apiurl)
          .then(res => {
            let data = res.data / 1000
            let temp = data.toFixed(1) 
            content.innerText = temp + "℃"
          })
      }, 500);
    }
  </script>
</body>

</html>